package com.library.librarybackend.service;

import com.library.librarybackend.domain.OSSObject;

import java.io.InputStream;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;

/**
 * @author 平
 * @description OSS服务
 * @since 2025-09-21 13:51
 */
public interface OSSService {

    String SEPARATOR = "/";

    String DASHED = "-";

    String DOT = ".";

    OSSObject upload(InputStream in, String type, String fileName, String path, Boolean isPrivate);

    void delete(String objName);

    String preview(String objName, Integer expires, TimeUnit timeUnit);

    void download(String objName, Consumer<InputStream> consumer);

    InputStream download(String objName);


}



